![require(esm) Backported to Node.js 20, Paving the Way for ESM-Only Packages](https://cdn.sanity.io/images/cgdhsj6q/production/be8ab80c8efa5907bc341c6fefe9aa20d239d890-1600x1097.png?w=400&fit=max&auto=format)
Security News
require(esm) Backported to Node.js 20, Paving the Way for ESM-Only Packages
require(esm) backported to Node.js 20, easing the transition to ESM-only packages and reducing complexity for developers as Node 18 nears end-of-life.
infestines
Advanced tools
This is a minimalistic library of basic utilities, such as currying, for writing more interesting high performance FP libraries. This library is not intended to be used for application programming. Primitives that are too specialized to be used as a basis for nearly optimal implementations of higher level operations are not provided.
I.arityN(n, (x1, ..., xm) => y) ~> x1 => ... => xn => y
I.curry((x1, ..., xn) => y) ~> x1 => ... => xn => y
I.curryN(n, (x1, ..., xn) => y) ~> x1 => ... => xn => y
I.curryN(2, x => {
const x2 = x*x
return y => x2 + y
})(2, 3)
// 7
I.compose2U(b => c, (a1, ..., aN) => b) ~> a1 => ... aN => c
I.pipe2U((a1, ..., an) => b, b => c) ~> a1 => ... aN => c
I.seq(value, ...fns) ~> value
I.seqPartial(maybeValue, ...fns) ~> maybeValue
I.always(x) ~> _ => x
I.applyU(x => y, x) ~> y
I.id(x) ~> x
I.sndU(_, x) ~> x
I.array0 ~> []
I.array0
is an
empty
frozen array
[]
.
I.object0 ~> {}
I.object0
is an
empty
frozen object
{}
.
I.isArray(any) ~> boolean
I.isDefined(any) ~> boolean
I.isFunction(any) ~> boolean
I.isInstanceOfU(Type, any) ~> boolean
I.isNumber(any) ~> boolean
I.isObject(any) ~> boolean
I.isString(any) ~> boolean
I.isThenable(any) ~> boolean
I.acyclicEqualsU(any, any) ~> boolean
I.hasKeysOfU(template, object)
I.identicalU(any, any) ~> boolean
I.whereEqU(template, object)
I.assocPartialU(key, value, object) ~> object
I.dissocPartialU(key, object) ~> object|undefined
I.hasU(propName, object) ~> boolean
I.keys(object) ~> [...keys]
I.toObject(object) ~> object
I.unzipObjIntoU(object, keys, values)
I.values(object) ~> [...values]
I.inherit(Derived, Base, Methods, Statics) ~> Derived
I.constructorOf(any) ~> Function|null|undefined
I.create(proto[, properties]) ~> object
I.freeze(any) ~> any
I.defineNameU(function, string) ~> function
I.prototypeOf(any) ~> object|null|undefined
I.assign(to, ...from) ~> to
I.resolve(any) ~> promise
I.Functor(map) ~> functor
I.Applicative(map, of, ap) ~> applicative
I.Monad(map, of, ap, chain) ~> monad
I.FantasyFunctor ~> functor
I.fromFantasyApplictive(Type) ~> applicative
I.fromFantasyMonad(Type) ~> monad
I.fromFantasy(Type) ~> functor|applicative|monad
I.Async ~> monadish
I.Identity ~> monad
I.IdentityAsync ~> monadish
I.IdentityOrU(predicate, monad) ~> monad
FAQs
A minimalistic library to support writing FP libraries
We found that infestines demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
require(esm) backported to Node.js 20, easing the transition to ESM-only packages and reducing complexity for developers as Node 18 nears end-of-life.
Security News
PyPI now supports iOS and Android wheels, making it easier for Python developers to distribute mobile packages.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.